package tests.pages;

import ch.lambdaj.function.convert.Converter;
import net.thucydides.core.annotations.DefaultUrl;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

import net.thucydides.core.pages.PageObject;

import java.util.List;

import static ch.lambdaj.Lambda.convert;

@DefaultUrl("http://82.200.2.19/activity/recent#_=_")

public class RecentActivityPage extends PageObject {


    @FindBy(className = "greeting")
    private  WebElement RecentElement;

    // public String word="Welcome back";

    public RecentActivityPage(WebDriver driver) {
        super(driver);
    }
    public void RecentElementt(String word) {
        word= element(RecentElement).getText();
        if (word!="NULL")
        {  word="Recent Activity is open";   }
        else word="Recent Activity isn't open";
    }                      }


//  public void should_opening_page()    {
//   assertThat(RecentPage.isElementVisible(By.className("greeting")), is(true));
// }
/* private Converter<WebElement, String> toStrings() {
return new Converter<WebElement, String>() {
    public String convert(WebElement from) {
        return from.getText();
    }
};
}
}        */

